<include file="__THEME__/header" />
<script type="text/javascript" src="__PUBLIC__/js/jquery.form.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery.LoadImage.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery.masonry.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery.infinitescroll.js"></script>
<script type="text/javascript" src="{:U('weibo/plugins/init')}"></script>

<style type="text/css">
<!--
.item {
  width: 215px;
  float: left;
  margin:auto;

}


-->
</style>


<script type="text/javascript">
$(function(){
         var speed = 1000;
         $("#container").masonry({
            singleMode: true,
            columnWidth: 233,
            itemSelector: '.item',
            animate: false,
            animationOptions: {
                duration: speed,
                queue: false
            }
		
        });
        $("#container").infinitescroll({
            navSelector : '#page_nav', // selector for the paged navigation
            nextSelector : '#page_nav a', // selector for the NEXT link (to page 2)
            itemSelector : '.item', // selector for all items you'll retrieve
            loadingImg : '__THEME__/images/loader.gif',
            donetext : '已经到最后一页了',
            debug: false,
            errorCallback: function() {
            // fade out the error message after 2 seconds
            $('#infscr-loading').animate({opacity: .8},2000).fadeOut('normal');
            }},
            // call masonry as a callback.
            function( newElements ) { $(this).masonry({ appendedContent: $(newElements) }); }
        );
		
    $(".haibao .pic img").LoadImage(true,210,1800,"__THEME__/images/icon_waiting.gif");
		
     });

</script>

<div class="content"><!-- 内容 begin  --> 
  <div class="main no_l wrap">
    <div class="mainbox ">
      <div class="mainbox_R">
	  <php>if(!empty($search_key)){</php>
	  <gt name="mid" value="0">
      <div class="right_box">
      <h2 id="followTopic"  class="followtopic2">
      <span class="ico_follow"></span><php>if($followState){</php>  
		  <a href="javascript:void(0)" onclick="weibo.unfollowTopic('{$search_key_id}','{$search_key}')">取消该话题</a>
		  <php>}else{</php>
		  <a href="javascript:void(0)" onclick="weibo.followTopic('{$search_key}')">关注该话题</a>
		  <php>}</php>
		  </h2>
      <h2><span class="ico_tuijian"></span><a href="javascript:void(0)" onclick="weibo.quickpublish('大家来谈谈#{$search_key}#这个话题吧！')">推荐该话题给朋友</a></h2>
      </div>
      </gt>
	  <php>}</php>
 
        <gt name="mid" value="0">
        <div class="right_box">
          <h2>关注的话题</h2>
          <ul class="topic_list">
          	<volist id="vo" name="followTopic">
            	<li><a href="{:U('home/user/topics',array('k'=>urlencode($vo['name'])))}" title="{$vo.name}">{$vo.name}</a></li>
			</volist>
 
          </ul>
        </div>
        </gt>
		
        <div class="right_box">
    	{:W('HotTopic', array('type'=>'auto'))} {:W('HotTopic', array('type'=>'recommend'))}</div>
        </div>
      </div>
      <div class="mainbox_C "> 
		 <div class="overflowH">
        <div class="tab-menu"><!-- 切换标签 begin  -->
          <ul>
            <li><a class="on feed_item" href="{:U('home/user/search',array('k'=>urlencode($search_key)))}"><span>搜分享({$list.count})</span></a></li>
            <li><a class="feed_item" href="{:U('home/user/searchuser',array('k'=>urlencode($search_key)))}"><span>搜人</span></a></li>
             <li><a class="feed_item" href="{:U('home/user/searchtag',array('k'=>urlencode($search_key)))}"><span>标签</span></a></li>
          </ul>
        </div>
        <div class="MenuSub">
	        <volist name="weibo_menu" id="vo"><php>if ($i > 1) {</php>|<php>}</php><a
		    href="{:U('home/User/search', array('k'=>urlencode($search_key),'type'=>$key))}" 
		    <eq name="type" value="$key">class="on"</eq>>{$vo}</a></volist>
		</div>
        <form action="{:U('home/user/search')}" method="post" >
		<div class="Search_box pb10">
          <div class="Search_bg">
          <div>
            <input type="text" name="k" class="text" style="width:400px;" maxlength="40" value="{$search_key}"/>
            <input class="btn_b" type="submit" value="搜索" />
          </div>
          </div>
          <div class="lh35 left" style="width:100%;font-size:14px;">
			<php>if(empty($search_key)) {</php>
			请输入关键字后点击搜索
			<php>}else {</php>
			以下是关于"<span class="cRed">{$search_key}</span>"的分享{$list.count}条
			<php>}</php>
		  </div>
        </div>
		</form>
		<div class="clearfix"></div>
		</div>
        <div class="pt10">
<php>if($list['data']){</php>        	
          <div class="look_qiang" id="container"> 
		 
		 
            <volist id="vo" name="list['data']">
			
			
			<div class="item">

                  <div class="haibao" onmouseover="this.className='haibao hover'" onmouseout="this.className='haibao'" >
                  		
                        <div class="pic">
						
						<php>
						if( $vo['transpond_id'] )
						{
								$weibo_id = $vo['transpond_id'];
						}else{  
						
								$weibo_id = $vo['weibo_id'];
						}
								$bcdata = M('weibo')->where("weibo_id=" . $weibo_id . "")->findAll() ;
								$title = unserialize($bcdata[0]['type_data']) ;
								if( $vo['type'] == 1 ){
									$st_arr='<div class="ipic"><a href='.U('home/Space/detail',array('id' =>''. $vo[weibo_id].'')).' target="_blank"><img class="mycpic" width="'.$title[mwidth].'" height="'.$title[mheight].'" src="__UPLOAD__/'.$title[thumbhaibaourl].'"></a></div>';
								}else if( $vo['type'] == 3 ){
									$st_arr='<div class="ivideo"><a href='.U('home/Space/detail',array('id' =>''. $vo[weibo_id].'')).' target="_blank"><img class="mycpic" width="'.$title[mwidth].'" height="'.$title[mheight].'" src="'.$title[flashimg].'"></a><div class="video_play"><a href='.U('home/Space/detail',array('id' =>''. $vo[weibo_id].'')).' target="_blank"><img src="__THEME__/images/feedvideoplay.gif"></a></div></div>';
								}else if( $vo['type'] == 5 ){
									$st_arr='<div class="ipic"><a href='.U('home/Space/detail',array('id' =>''. $vo[weibo_id].'')).' target="_blank" title="'.$title[g_title] .'"><img width="'.$title[mwidth].'" height="'.$title[mheight].'" src="'.$title[middle_pic].'"></a></div><div class="jiage">￥'.$title[price].'</div>';	
								}
								echo $st_arr;
						</php>
						<div class="hbc">
						<session name="userInfo">
						<a href="javascript:void(0)" onclick="weibo.pinglun({$vo.weibo_id})" class="hb comment-btn" >评论</a>
						<php>if( $vo['uid'] == $mid ){</php><a href="javascript:void(0)" onclick="weibo.myedit({$vo.weibo_id},{$vo.bc_id},0)" class="hb edit-btn"><span></span>编辑</a><php>}else{</php>
						<php>if(favisloveno($vo['weibo_id'])=='1'){</php>
						<a w="f" href="javascript:void(0)" onclick="ui.loveok2(this,'1','{$vo.favcount}','{$vo.weibo_id}','{$mid}','{$vo.uid|getUserFace}')" callback="weibo.deletfav2('{$vo.weibo_id}')" class="hb unfavourite-btn" id="favloe_{$vo.weibo_id}"><span></span><span  style="display:none" class="favCount" id="fav_{$vo.weibo_id}">{$vo.favcount}</span>取消</a>
						<php>}else{</php>
						<a w="f" href="javascript:void(0)" onclick="ui.loveok2(this,'1','{$vo.favcount}','{$vo.weibo_id}','{$mid}','{$vo.uid|getUserFace}')" callback="weibo.deletfav2('{$vo.weibo_id}')" class="hb favourite-btn" id="favloe_{$vo.weibo_id}"><span></span><span  style="display:none" class="favCount" id="fav_{$vo.weibo_id}">{$vo.favcount}</span>喜欢</a>
						<php>}</php><span class="tou" id="favicon_{$vo.weibo_id}"></span>
						<php>}</php>
						<else/>
						<a href="{:U('home/Public/login')}" class="hb comment-btn" >评论</a>
						<a href="{:U('home/Public/login')}" class="hb edit-btn"><span></span>喜欢</a>
						</session>
						</div><session name="userInfo"><a href="javascript:void(0)" onclick="weibo.transpond({$vo.weibo_id},0)" class="hb forward-btn"><span></span>转发</a><else/><a href="{:U('home/Public/login')}" class="hb forward-btn"><span></span>转发</a></session><php>if( $vo['uid'] == $mid ){</php><a href="javascript:void(0)" onclick="ui.confirm(this,'确认要删除此分享?')" callback="weibo.deleted({$vo.weibo_id})" class="hb2 del-btn" title="删除?"><span></span> </a><php>}</php></div>
						<div class="pincontent"><p class="vocontent">{$vo.content|format=true}<if condition="$vo['type'] eq 5"><u class="_tb"></u></if></p>
						<php>if( $vo['transpond_id'] ){
						$transpond = $bcdata[0]['transpond'] ;
						</php>
						转发 {$transpond} 
						<php>}
						if( $vo['comment'] ){</php>
						评论 {$vo.comment} 
						<php>}
						if( $vo['favcount'] ){</php>
						喜欢 {$vo.favcount}
						<php>}</php>
						
						</div>
						
							
							
              <div class="pin_c">
			  <div class="myavatar floatleft"><space uid="vo.uid">{uavatar=s}</space></div>
                <div class="msgCnt"><space uid="vo.uid">{uname}</space>{$vo.uid|getUserGroupIcon}  
				<if condition="$vo['transpond_id']">
				转发到 
				<else/>
				分享到 
				</if>
				<a href="{:U('home/Space/board',array('uid'=>$vo['uid'], 'type'=>1 ,'bc_id'=>$vo['bc_id']))}">{$vo.weibo_id|getBname}</a><br />
<span class="mydate">{$vo.ctime|friendlyDate}</span></div>
				
               
			   
              
			    
              </div>
				
           
                   
                   
                </div>
				</div>
			
			
			
			

		  
            </volist>
		  
		  
		  
		 
        </div>
<php>}else{</php>
	<php>if(!empty($search_key)) {</php>
	<div class="overflowH">
	<ul class="feed_list"><li style="font-size:14px; color:red;">未搜索到相关的话题</li></ul>
	</div>
	<php>}</php>
<php>}</php>
        </div>
		
        <div class="c"></div>
		<div class="seemore">

	   	<p class="page" id="page_nav">{$list.html}</p>
       </div>

		      </div>
	  
    </div>
    <div class="clear"></div>
  </div>
</div>
<!-- 内容 end --> 

<include file="__THEME__/footer" /> 